SFILES		:= $(notdir $(wildcard source/*.cpp))
OFILES		:= $(SFILES:.cpp=.o)

SDL_CFLAGS	:= $(shell sdl-config --cflags)
SDL_LDFLAGS	:= $(shell sdl-config --libs)

all: $(OFILES)
	g++ -o madness -O3 $(OFILES) -L/usr/lib/boost-1_50/ -lSDL -lboost_thread-mt $(SDL_LFLAGS)

$(OFILES): %.o:
	g++ -O3 -fpermissive -c $(SDL_CFLAGS) source/$(@:.o=.cpp)
